package com.ruoyi.finance.service.impl;

import com.ruoyi.finance.domain.FmsCooperate;
import com.ruoyi.finance.mapper.FmsCooperateMapper;
import com.ruoyi.finance.service.IFmsCooperateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 加盟 服务层实现
 *
 * @author 夜雨
 */
@Service
public class FmsCooperateServiceImpl implements IFmsCooperateService {
    @Autowired
    private FmsCooperateMapper cooperateMapper;

    /**
     * 查询加盟
     *
     * @param cooperateId 加盟ID
     * @return 加盟
     */
    @Override
    public FmsCooperate selectCooperateById(Long cooperateId) {
        return cooperateMapper.selectCooperateById(cooperateId);
    }

    /**
     * 查询加盟列表
     *
     * @param cooperate 加盟
     * @return 公告集合
     */
    @Override
    public List<FmsCooperate> selectCooperateList(FmsCooperate cooperate) {
        return cooperateMapper.selectCooperateList(cooperate);
    }

    /**
     * 新增加盟
     *
     * @param cooperate 加盟
     * @return 结果
     */
    @Override
    public int insertCooperate(FmsCooperate cooperate) {
        return cooperateMapper.insertCooperate(cooperate);
    }

    /**
     * 修改加盟
     *
     * @param cooperate 加盟
     * @return 结果
     */
    @Override
    public int updateCooperate(FmsCooperate cooperate) {
        return cooperateMapper.updateCooperate(cooperate
        );
    }

    /**
     * 删除加盟
     *
     * @param cooperateId 加盟ID
     * @return 结果
     */
    @Override
    public int deleteCooperateById(Long cooperateId) {
        return cooperateMapper.deleteCooperateById(cooperateId);
    }

    /**
     * 批量删除加盟
     *
     * @param cooperateIds 需要删除的加盟ID
     * @return 结果
     */
    @Override
    public int deleteCooperateByIds(Long[] cooperateIds) {
        return cooperateMapper.deleteCooperateByIds(cooperateIds);
    }
}
